package com.woniuxy.project115.kaer.tenant.feign;

import com.woniuxy.project115.kaer.commons.util.Result;
import com.woniuxy.project115.kaer.tenant.dto.ApplicationAttachmentDto;
import com.woniuxy.project115.kaer.tenant.dto.SettledApplicationDto;
import com.woniuxy.project115.kaer.tenant.form.ApproveApplicationForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author HuH
 * @version 1.0
 * @CreatTime 2025-02-27 12:14
 * @description
 */
@FeignClient("tenant-server")
public interface TenantFeignClient {
    @PostMapping("/tenant/settledApplication/getPendingApplication")
    public Result<SettledApplicationDto> getPendingApplication() throws Exception;

    @PostMapping("/tenant/settledApplication/approveApplication")
    public Result approveApplication(@RequestBody ApproveApplicationForm form) throws Exception;

    @PostMapping("/tenant/applicationAttachment/getAttachmentById")
    public Result<ApplicationAttachmentDto> getAttachmentById(@RequestParam("applicationId") Integer applicationId) throws Exception;
}
